$('#captcha').sliderCaptcha({
    repeatIcon:'fa fa-redo',
    setSrc: function () {
        var jpg = 'http://localhost:8090/images/13.jpg';
        return jpg;
    },
    onSuccess: function () {
        parent.$('input[name=b]').val(true);
        parent.$('input[name=sub]').click();
        setInterval(function () {
            var layer = parent.layer;
            layer.close(layer.index);
        },800)
    },
    onFail:function(){
        parent.$('input[name=b]').val(false);
    }
});